package com.boang.lock;

/*
    @author:sa
    @date:2024/11/26 13:43
*/
public class TicketDemo01 extends Thread{
    private int num=20;
    @Override
    public void run() {
        while (true) {
//           Thread thread = Thread.currentThread();
//           String name=Thread.gatName();
            if (num > 0) {
                System.out.println(Thread.currentThread().getName() + ":" + num--);
            }
        }
    }
}